<html><head><title>TextGadget</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">TextGadget()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#3A3966"><b>TextGadget</b></font>(#Gadget, x, y, Width, Height, Text$ [, Flags])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Creates a Text gadget in the current GadgetList. A TextGadget is a basic text area for displaying, not entering, text. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Gadget</i></td>
<td width="90%"> 
A number to identify the new gadget. <a href="../reference/purebasic_objects.html">#PB_Any</a> can 
be used to auto-generate this number. 

</td></tr>
<tr><td><i>x, y, Width, Height</i></td>
<td> 
The position and dimensions of the new gadget. 

</td></tr>
<tr><td><i>Text$</i></td>
<td> 
The text to display. 

</td></tr>
<tr><td><i>Flags (optional)</i></td>
<td> 
Flags to modify the gadget behavior. It can be a combination of the following values: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Text_Center</font> : The text is centered in the gadget.
  <font color="#924B72">#PB_Text_Right</font>  : The text is right aligned.
  <font color="#924B72">#PB_Text_Border</font> : A sunken border is drawn around the gadget.
</font></pre>

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

Returns nonzero on success and zero on failure. If <font color="#924B72">#PB_Any</font> was used as the #Gadget parameter 
then the return-value is the auto-generated gadget number on success. 

</blockquote><p><b>Remarks</b></p><blockquote>

The content can be changed with the function <a href="setgadgettext.html">SetGadgetText()</a> and can be 
obtained with <a href="getgadgettext.html">GetGadgetText()</a>. The font of a TextGadget() you easily 
change with <a href="setgadgetfont.html">SetGadgetFont()</a>. 
<br>
<br>
This gadget supports the <a href="setgadgetcolor.html">SetGadgetColor()</a> and <a href="getgadgetcolor.html">GetGadgetColor()</a> functions with 
the following values as 'ColorType': 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Gadget_FrontColor</font>: Textcolor
  <font color="#924B72">#PB_Gadget_BackColor</font> : Backgroundcolor
</font></pre>

Note: This Gadget doesn't receive any user events, and <a href="gadgettooltip.html">GadgetToolTip()</a> can't be used with it. 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <font color="#3A3966">OpenWindow</font>(0, 0, 0, 270, 160, &quot;TextGadget&quot;, <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
<font color="#3A3966">    TextGadget</font>(0, 10,  10, 250, 20, &quot;TextGadget Standard (Left)&quot;)
<font color="#3A3966">    TextGadget</font>(1, 10,  70, 250, 20, &quot;TextGadget Center&quot;, <font color="#924B72">#PB_Text_Center</font>)
<font color="#3A3966">    TextGadget</font>(2, 10,  40, 250, 20, &quot;TextGadget Right&quot;, <font color="#924B72">#PB_Text_Right</font>)
<font color="#3A3966">    TextGadget</font>(3, 10, 100, 250, 20, &quot;TextGadget Border&quot;, <font color="#924B72">#PB_Text_Border</font>)
<font color="#3A3966">    TextGadget</font>(4, 10, 130, 250, 20, &quot;TextGadget Center + Border&quot;, <font color="#924B72">#PB_Text_Center</font> | <font color="#924B72">#PB_Text_Border</font>)
    <b><font color="#3A3966">Repeat</font></b> : <b><font color="#3A3966">Until</font></b> <font color="#3A3966">WaitWindowEvent</font>() = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#3A3966">EndIf</font></b>
</font></pre>
<br>
<p><img src="../HelpPictures/textgadget.png"></p>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="getgadgettext.html">GetGadgetText()</a>, <a href="setgadgettext.html">SetGadgetText()</a>, <a href="getgadgetcolor.html">GetGadgetColor()</a>, <a href="setgadgetcolor.html">SetGadgetColor()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=stringgadget.html>StringGadget()</a> - <a href="index.html">Gadget Index</a> - <a href="trackbargadget.html">TrackBarGadget()</a> -><br><br>

</body></html>